select top 10 * from tblPersonnelKB Where PDisplayName LIKE '%Lim Lay Lee%'
select top 10 * from KrisFlyerLive..tblPersonnel Where PPersonSurName LIKE '%Annie%'


select top 10 * from tblPersonnelKB
Where PPersonCode IN
(select PPersonCode from KrisFlyerLive..tblPersonnel 
Where PAspectUserID IN (2013, 2069, 2105, 2241, 2242, 2243, 2249)
And PResigned = 0)

select * from tblPersonnelKB Where PSinSales = 1

select top 10 * from tblUserGroupAccess Where PPersonCode IN 
(Select pPersonCode from tblPersonnelKB Where PSinSales = 1)

select top 10 * from KrisFlyerLive..tblPersonnel  Where PSinSales = 1
Where PAspectUserID IN (2013, 2069, 2105, 2241, 2242, 2243, 2249)
And PResigned = 0

select * from [dbo].[tblUserGroupAccessDet] Where GroupAccessID IN (1102, 1103)

select top 10 * from tblTeam Where TeamID = 27

select top 10 * from KrisFlyerLive..tblPersonnel Where PSinSales = 1

select top 10 * from tblUserGroupAccess Where PPersonCode IN 

select * from tblPersonnelKB Where PSinSales = 1 
And PPersonCode NOT IN (select PPersonCode from tblUserGroupAccess)
And PActive = 1